package smtp;

import javax.mail.Session;
import javax.swing.JOptionPane;

import com.sun.mail.smtp.SMTPTransport;

/** 
 * Main driver for the SMTP Client
 * Creates and manages all the various windows needed for this application
 * @author wendlandts
 *
 */
public class SMTPDriver {

	private LoginScreen ls;

	public static void main(String [] ignored) {
		new SMTPDriver();
	}

	/**
	 * Constructor which starts the login screen
	 */
	public SMTPDriver() {
		ls = new LoginScreen(this);
	}

	/**
	 * After logging in to the MSOE servers, prompt the user for the next action.
	 * Either viewing email, or sending an email
	 */
	public void startMainScreen() {
		Session session = ls.getSession();
		SMTPTransport transport = ls.getTransport();
		// No need to keep the LoginScreen around
		ls.dispose();

		// A custom message dialogue to ask the user what they want to do
		new MainScreen(session, transport);
	}
}
